package com.laomou.logdog.loginfo;

import javafx.beans.property.SimpleStringProperty;

public class LogInfo {
    private final SimpleStringProperty line = new SimpleStringProperty("");
    private final SimpleStringProperty date = new SimpleStringProperty("");
    private final SimpleStringProperty time = new SimpleStringProperty("");
    private final SimpleStringProperty logLv = new SimpleStringProperty("");
    private final SimpleStringProperty pid = new SimpleStringProperty("");
    private final SimpleStringProperty tid = new SimpleStringProperty("");
    private final SimpleStringProperty tag = new SimpleStringProperty("");
    private final SimpleStringProperty message = new SimpleStringProperty("");

    public SimpleStringProperty lineProperty() {
        return line;
    }

    public SimpleStringProperty dateProperty() {
        return date;
    }

    public SimpleStringProperty timeProperty() {
        return time;
    }

    public SimpleStringProperty logLvProperty() {
        return logLv;
    }

    public SimpleStringProperty pidProperty() {
        return pid;
    }

    public SimpleStringProperty tidProperty() {
        return tid;
    }

    public SimpleStringProperty tagProperty() {
        return tag;
    }

    public SimpleStringProperty messageProperty() {
        return message;
    }

    public String getLine() {
        return line.get();
    }

    public void setLine(String line) {
        this.line.set(line);
    }

    public String getDate() {
        return date.get();
    }

    public void setDate(String date) {
        this.date.set(date);
    }

    public String getTime() {
        return time.get();
    }

    public void setTime(String time) {
        this.time.set(time);
    }

    public String getLogLv() {
        return logLv.get();
    }

    public void setLogLv(String logLV) {
        this.logLv.set(logLV);
    }

    public String getPid() {
        return pid.get();
    }

    public void setPid(String pid) {
        this.pid.set(pid);
    }

    public String getTid() {
        return tid.get();
    }

    public void setTid(String thread) {
        this.tid.set(thread);
    }

    public String getTag() {
        return tag.get();
    }

    public void setTag(String tag) {
        this.tag.set(tag);
    }

    public String getMessage() {
        return message.get();
    }

    public void setMessage(String message) {
        this.message.set(message);
    }

    @Override
    public String toString() {
        return this.getLine() + " " + this.getDate() + " " + this.getTime() + " " + this.getLogLv() + " " + this.getPid() + " " + this.getTid() + " " + this.getTag() + " " + this.getMessage();
    }

    public String string() {
        return this.getDate() + " " + this.getTime() + " " + this.getLogLv() + " " + this.getPid() + " " + this.getTid() + " " + this.getTag() + " " + this.getMessage();
    }
}
